.image-edit-overlay {
    .modal-overlay-close {
        display: none;
    }

    .image-edit__settings .collapse-toggle {
        color: #fff; 
    }

    .help-block {
        color: #fff;
    }
}

.modal-overlay.dark.image-edit-overlay {
    padding: 2vw;
    background: rgba(0,0,0, 0.9);
}

.image-edit {
    height: 100%;
    max-height: 100%;
    container-type: inline-size;
    container-name: image-edit;
}

.image-edit-container {
    overflow: hidden;
    max-height: 100%;
}

@container image-edit (min-width: 900px) {
    .image-edit-container {
        display: grid;
        grid-template-columns: 1fr 30%;
        grid-template-rows: minmax(0,1fr);
        gap: 3rem;
    }
}

.image-edit__original {
    grid-row: 1;
    grid-column: 1;
    min-width: 0;
    position: relative;
}

.image-edit__original__wrapper {
    overflow: hidden;
    position: relative;
    transform-origin: center center;

    img {
        display: block;
    }
}

.image-edit-crop__wrapper {
    position: absolute;
    z-index: 1400;
    cursor: crosshair;
    transform-origin: center center;

    .image-edit-crop {
        display: none;
        position: absolute;
        box-sizing: border-box;
        z-index: 1401;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        background-color: rgba(#333, 0.5);
    }

    .image-edit-crop-bottom {
        border-top: 1px solid white;
    }
    .image-edit-crop-top {
        border-bottom: 1px solid white;
    }
    .image-edit-crop-left {
        border-right: 1px solid white;
    }
    .image-edit-crop-right {
        border-left: 1px solid white;
    }

    .image-edit-crop-center {
        display: none;
        cursor: pointer;
        position: absolute;
        font-size: 20px;
        line-height: 20px;
        height: 20px;
        width: 20px;
        text-align: center;
        color: red;
        text-shadow: 1px 1px 2px black;
        z-index: 1410;
    }
}

.image-edit__settings {
    grid-row: 1;
    grid-column: 2;
    min-width: 0;
    padding: 2rem 2rem 3rem;
    overflow-y: auto;
    background: #222;
    border-radius: 4px;

    label {
        font-weight: normal;

        span {
            font-weight: bold;
        }
    }

    .form-actions {
        margin-top: 40px;
        text-align: center;
    }

    .collapse-toggle {
        display: block;
        margin: 5px 0;
        border-top: 1px solid #666;
        padding: 10px 0;
        font-size: 1.2em;

        &:hover,
        &:active,
        &:focus {
            text-decoration: none;
        }

        &:before {
            content: "\25B6";
            padding-right: 0.5em;
        }

        &[aria-expanded='true']:before {
            content: "\25BC";
        }
    }
}